from django.contrib import admin

from ff_app.models import FarmerFile

admin.site.site_header = admin.site.site_header + ' 农户建档管理'

# Register your models here.
# 农户建档Admin类
@admin.register(FarmerFile)
class FarmerFileAdmin(admin.ModelAdmin):
    # 列表显示字段
    list_display = ['id', 'name', 'gender', 'created_time', 'last_modified']

    list_display_links = ['name']

    search_fields = ['name', 'phone', 'id_number']

    readonly_fields = ['farmer']
